% Use only LaTeX2e, calling the article.cls class and 12-point type.

\documentclass[12pt]{article}

% Users of the {thebibliography} environment or BibTeX should use the
% scicite.sty package, downloadable from *Science* at
% www.sciencemag.org/about/authors/prep/TeX_help/ .
% This package should properly format in-text
% reference calls and reference-list numbers.
\usepackage[UTF8]{ctex} % 中文
\usepackage{scicite}
\usepackage{bm}
\usepackage{amsmath}
\usepackage[hidelinks]{hyperref}
\usepackage[framemethod=tikz]{mdframed} % 用来做插入解释段
\mdfdefinestyle{info}{%
	topline=false, bottomline=false,
	leftline=false, rightline=false,
	nobreak,
	singleextra={%
		\fill[black](P-|O)circle[radius=0.4em];
		\node at(P-|O){\color{white}\scriptsize\bf i};
		\draw[very thick](P-|O)++(0,-0.8em)--(O);%--(O-|P);
	}
}

% Define a custom environment for information
\newenvironment{info}[1][Info:]{ % Set the default title to "Info:"
	\medskip
	\begin{mdframed}[style=info]
		\noindent{\textbf{#1}}
}{
	\end{mdframed}
}

% Use times if you have the font installed; otherwise, comment out the
% following line.

\usepackage{times}

% The preamble here sets up a lot of new/revised commands and
% environments.  It's annoying, but please do *not* try to strip these
% out into a separate .sty file (which could lead to the loss of some
% information when we convert the file to other formats).  Instead, keep
% them in the preamble of your main LaTeX source file.


% The following parameters seem to provide a reasonable page setup.

\topmargin 0.0cm
\oddsidemargin 0.2cm
\textwidth 16cm
\textheight 21cm
\footskip 1.0cm


%The next command sets up an environment for the abstract to your paper.

\newenvironment{sciabstract}{%
\begin{quote} \bf}
{\end{quote}}


% If your reference list includes text notes as well as references,
% include the following line; otherwise, comment it out.

% \renewcommand\refname{References and Notes}

% The following lines set up an environment for the last note in the
% reference list, which commonly includes acknowledgments of funding,
% help, etc.  It's intended for users of BibTeX or the {thebibliography}
% environment.  Users who are hand-coding their references at the end
% using a list environment such as {enumerate} can simply add another
% item at the end, and it will be numbered automatically.

\newcounter{lastnote}
\newenvironment{scilastnote}{%
\setcounter{lastnote}{\value{enumiv}}%
\addtocounter{lastnote}{+1}%
\begin{list}%
{\arabic{lastnote}.}
{\setlength{\leftmargin}{.22in}}
{\setlength{\labelsep}{.5em}}}
{\end{list}}


% Include your paper's title here

\title{矩阵基础}


% Place the author information here.  Please hand-code the contact
% information and notecalls; do *not* use \footnote commands.  Let the
% author contact information appear immediately below the author names
% as shown.  We would also prefer that you don't change the type-size
% settings shown here.

\author
{eleve11}

% Include the date command, but leave its argument blank.

\date{\today}
%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%

\begin{document}

% Double-space the manuscript.

\baselineskip24pt

% Make the title.

\maketitle

% In setting up this template for *Science* papers, we've used both
% the \section* command and the \paragraph* command for topical
% divisions.  Which you use will of course depend on the type of paper
% you're writing.  Review Articles tend to have displayed headings, for
% which \section* is more appropriate; Research Articles, when they have
% formal topical divisions at all, tend to signal them with bold text
% that runs into the paragraph, for which \paragraph* is the right
% choice.  Either way, use the asterisk (*) modifier, as shown, to
% suppress numbering.

\section*{向量空间}
    首先。集合，就是某些元素的集合。而\texttt{向量空间}则是以向量为元素的集合$V$。
		\begin{info}
			空间$R^n$由具有n个分量的所有列向量$\overrightarrow{v}$组成，所有的子空间需要包含
			$\overrightarrow{0}$向量
		\end{info}
		在我们求解问题$A \overrightarrow{x} = \overrightarrow{b}$时，涉及到则是
		\textbf{列空间}(列空间由列的所有线性组合组成，组合是所有可能的向量
		$A\overrightarrow{x}$，他们填充了列空间)，
		$A \overrightarrow{x} = \overrightarrow{b}$方程有解也是当且仅当向量
		$\overrightarrow{b}$在$A$的列空间中。
		\begin{info}
			\textbf{零空间}(Nullspace)由线性方程组$A\overrightarrow{x}=0$的所有解组成，
			其中解$\overrightarrow{x}$在向量空间$R^n$中。
		\end{info}

\section{奇异矩阵}
    奇异矩阵是线性代数的概念，就是该矩阵的秩不是满秩。第一矩阵得是方阵，然后，如果矩阵的行列式是否等于$0$，若等于$0$，称矩阵$\bm{A}$为奇异矩阵，若不等于$0$，称矩阵$\bm{A}$为非奇异矩阵。由$\mid \bm{A} \mid$可知矩阵$\bm{A}$可逆，由此可知，可逆矩阵就是非奇异矩阵，非奇异矩阵也是可逆矩阵。如果$\bm{A}$为奇异矩阵，则$\bm{AX}=0$有无穷解，$\bm{AX}=\bm{b}$有无穷解或无解。如果$\bm{A}$为非奇异矩阵，则$\bm{AX}=0$有且只有唯一零解，$\bm{AX}=\bm{b}$有唯一解。

\section{范数}
		\begin{info}
			范数对向量空间的作用就像实数轴上的绝对值：它提供距离的一个度量，更确切的说$\Re ^n$与
			其上的一个范数定义了一个度量空间，从而，我们在研究向量及向量值的函数时有领域、开集、
			收敛和连续性等概念 \cite{bc}
		\end{info}
		不过从书籍\cite{bd}最简单的解释，我们在考虑向量空间中的两个点之间的距离，首先我们考虑欧
		式距离，通过毕达哥拉斯定理可以算出距离。如果加上格子，将环境放置到街区中，考虑到曼哈顿距离
		便是两点坐标相减绝对值之和。我们对距离的``需求''不一样，就导致了范数概念的出现。
    \begin{info}
        分析矩阵算法时常需要利用矩阵范数。例如，线性方程组的解法在系数矩阵，``几乎奇异''时效果很差，为了量化``几乎奇异''这一概念需要使用矩阵空间中距离的度量，矩阵范数提供了此度量
    \end{info}


\section{实对称矩阵}
    如果有n阶方阵$\bm{A}$，其矩阵的元素都是实数，且矩阵$\bm{A}$的转置等于其本身($a_{ij}=a_{ji}$)，则称$\bm{A}$为实对称矩阵。
    主要性质有:
    \begin{enumerate}
        \item 实对称矩阵$\bm{A}$的\textbf{不同特征值}对应的特征向量是正交的
        \item 实对称矩阵$\bm{A}$的特征值都是实数，特征向量都是实向量
        \item n阶实对称矩阵$\bm{A}$必然可对角化，且对角线上的元素是矩阵本身的特征值，即存在正交矩阵$\bm{Q}$，使得$\bm{Q^{-1}}\bm{A}\bm{Q}$成为对角矩阵。
        \item 若$\lambda_0$是矩阵$\bm{A}$的k重特征值，则必有k个线性无关的特征向量
    \end{enumerate}
    举个栗子，求实对称矩阵$\bm{A}$的特征值与特征向量(来自百度文库的一个例子，上传者的ppt中犯了些低级错误
    \url{https://wenku.baidu.com/view/4f60f8a40029bd64783e2cbd.html}，不认真)：
    \begin{displaymath}
        \bm{A}=\begin{bmatrix}
            3 & 2 & 4 \\
            2 & 0 & 2 \\
            4 & 2 & 3
        \end{bmatrix}
    \end{displaymath}
    即求使得等式$\bm{A}\bm{x}=\lambda\bm{x}$的$\lambda$
    \begin{displaymath}
        (\lambda \bm{E}-\bm{A}) \bm{x}=0
        \quad \Longrightarrow \quad \mid \lambda \bm{E}-\bm{A} \mid =0
    \end{displaymath}
    \begin{displaymath}
        \mid \lambda \bm{E}-\bm{A} \mid = \begin{bmatrix}
            \lambda - 3 & -2 & -4 \\
            -2 & \lambda & -2 \\
            -4 & -2 & \lambda - 3
        \end{bmatrix} = 0
    \end{displaymath}
    解，结果如下
    \begin{displaymath}
        (\lambda - 8)(\lambda+1)^2=0 \Longrightarrow \lambda = 8 / \lambda = -1
    \end{displaymath}
    其中$\lambda = -1$为$2$重特征值，把每个特征值代入线性方程
    $(\lambda \bm{E}-\bm{A}) \bm{x}=0$得到基础解系。 \\
    将$-1$代入，得：
    \begin{displaymath}
        (-\lambda-\bm{A})=\begin{bmatrix}
            -4 & -2 & -4 \\
            -2 & -1 & -2 \\
            -4 & -2 & -4
        \end{bmatrix} \longrightarrow \begin{bmatrix}
            -2 & -1 & -2 \\
            0 & 0 & 0 \\
            0 & 0 & 0
        \end{bmatrix}
    \end{displaymath}
    \begin{displaymath}
      \begin{bmatrix}
          -2 & -1 & -2 \\
          0 & 0 & 0 \\
          0 & 0 & 0
      \end{bmatrix}
      \begin{bmatrix}
          x_1 \\
          x_2 \\
          x_3
      \end{bmatrix}=0 \Longrightarrow 2x_1+x_2+2x_3 = 0
    \end{displaymath}
    得到基础解系是：
    \begin{displaymath}
        \bm{\alpha_1} = \begin{bmatrix}
            1 \\
            -2 \\
            0
        \end{bmatrix} \qquad
        \bm{\alpha_2} = \begin{bmatrix}
            0 \\
            -2 \\
            1
        \end{bmatrix}
    \end{displaymath}
    将其正交化:
    \begin{info}% Information block
        直观的说，正交向量是最无关的，因为正交向量指向完全不同的方向。
    \end{info}
    \begin{displaymath}
        \bm{\beta_1} = \bm{\alpha_1} = \begin{bmatrix}
            1 \\
            -2 \\
            0
        \end{bmatrix}
    \end{displaymath}
    $<\alpha, \beta>$表示向量间的内积
    \begin{displaymath}
        \bm{\beta_2} = \alpha_2 - \frac{<\alpha_2, \beta_1>}{<\beta_1, \beta_1>}\beta_1 = \begin{bmatrix}
            \frac{-4}{5} \\
            \frac{-2}{5} \\
            1
        \end{bmatrix}
    \end{displaymath}
    然后单位化(归一化，即向量内一个元素除以向量内所有元素的平方和开根号的绝对值。)：
    \begin{displaymath}
        \bm{\beta_1} = \begin{bmatrix}
            \frac{1}{\sqrt{5}} \\
            \frac{-2}{\sqrt{5}} \\
            0
        \end{bmatrix} \quad
        \bm{\beta_2} = \begin{bmatrix}
            \frac{-4}{3\sqrt{5}} \\
            \frac{-2}{3\sqrt{5}} \\
            \frac{5}{3\sqrt{5}}
        \end{bmatrix}
    \end{displaymath}
    同样操作，得到$\lambda=8$的基础解系
    \begin{displaymath}
        \begin{bmatrix}
            2 \\
            1 \\
            2 \\
        \end{bmatrix}
    \end{displaymath}
    单位化：
    \begin{displaymath}
        \begin{bmatrix}
            \frac{2}{3} \\
            \frac{1}{3} \\
            \frac{2}{3}
        \end{bmatrix}
    \end{displaymath}
    得到正交矩阵$\bm{Q}$：
    \begin{displaymath}
        \bm{Q} = \begin{bmatrix}
            \frac{1}{\sqrt{5}} & \frac{-4}{3\sqrt{5}} & \frac{2}{3} \\
            \frac{-2}{\sqrt{5}} & \frac{-2}{3\sqrt{5}} & \frac{1}{3} \\
            0 & \frac{5}{3\sqrt{5}} & \frac{2}{3}
        \end{bmatrix}
    \end{displaymath}
    也即正交矩阵$\bm{Q}$，使得：
    \begin{displaymath}
        \bm{Q^{-1}AQ} = \Lambda = \begin{bmatrix}
            -1 & & \\
            & -1 & \\
            & & 8
        \end{bmatrix}
    \end{displaymath}
    这也是在机器学习中经常见到的\textbf{特征值分解}

\newpage
\begin{thebibliography}{99}
		\bibitem{b} G.Strang. Introduction to Linear algebra (2016)
    \bibitem{ba} Kaare Brandt Petersen, Michael Syskind Pedersen. The Matrix
  Cookbook (2012)
		\bibitem{bb} 张贤达. 矩阵分析与应用 (2013)
		\bibitem{bc} G.H.Golub,C.F.Van Loan著,袁湘亚等译. 矩阵计算 (2009)
		\bibitem{bd} Cambridge University. Optimization Models (2014)

\end{thebibliography}

\end{document}
